<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.jwpdk.dbframework.*"%>
<%@ page import="java.sql.* "%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://s1.bdstatic.com/r/www/cache/static/jquery/jquery-1.10.2.min_f2fb5194.js"></script>
<title>Insert title here</title>
</head>
<body>
你好
<form id="tsform" action="test" method="get">
<input type="text" value="" name="a1" />
<input type ="submit" value="测试form" /> 
<input type ="button" value="测试js" onclick="test()"/> 
</form>
<script type="text/javascript">
function test(){
   $.ajax({  
         url:'test.action',  
         type:"get",  
         async:true,  
         data:{'a1':'大爷'},  
        // timeout:"1000",  
         error:function(){alert("服务加载出错");},  
         success:function(data)  
                 {  
                     alert(data);  
                     $("#target").html(data);  
                     alert("服务加载成功");  
                 }  
     });

//	var zh=encodeURI(dy);
	//alert(zh);
}

</script>
</body>
</html>